package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDetailMapper {
    void insert(List<OrderDetail> orderDetailList);

    @Select("select * from order_detail where order_id=#{orderId}")
    List<OrderDetail> selectByOrderId(Long orderId);


    List<OrderDetail> getByOrderId(Long id);

    @Delete("delete sky_take_out.order_detail where order_id=#{id}")
    void deleteByOrderId(Long id);
}
